package com.com.effectivejava.objectcreation;

/**
 * Created by pankaj on 7/6/14.
 */
public class NonInstantiableClass {


    //As a side effect, this technique prevents inheritance
    // no class can subclass this class. and is good alternative to
    // abstract classes which allows for non instantiable classes but
    // gives encouragement to inheritance.

    private NonInstantiableClass(){
        // provide insurance incase constructor is accidently
        // called from with in the class.
        throw new AssertionError();
    }
}
